﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.BIZ;
using AnyOffice.Components;

namespace AnyOffice.module.attach
{
    public partial class download : System.Web.UI.Page
    {   

     
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            string attachmentId = (Request.QueryString["attachment_id"] == null) ? "" : Request.QueryString["attachment_id"].ToString();
            string str2 = (Request.QueryString["name"] == null) ? "" : Request.QueryString["name"].ToString();
            if (((attachmentId != "") && (str2 != "")) && AttachmentBiz.Contains(attachmentId))
            {
                Download.ResponseFile(Server.MapPath(AttachmentBiz.AttachmentPath) + @"\" + attachmentId + @"\" + str2);
            }


        }
    }
}
